*******************************************	   
************* Table A6 Moved to a gold municiplaity
*******************************************	   

clear all
clear matrix
set more off

* Data 
use "~/Dropbox/Replication_MVC/Datasets/datasets_analysis/panel_excombatientes.dta", clear 


eststo clear
set more off


eststo clear
set more off

reghdfe moved_to_gold mean_gold_shock_r, absorb(wartimenetwork year origmun) vce(cluster origmun id)
estadd local ALLFE = "$\checkmark$"
summ moved_to_gold if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe moved_to_gold mean_gold_shock_r time_t, absorb(wartimenetwork year origmun) vce(cluster origmun id)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
summ moved_to_gold if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe moved_to_gold mean_gold_shock_r c.time_t##i.region, absorb(wartimenetwork year origmun) vce(cluster origmun id)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
estadd local MT = "$\checkmark$"
summ moved_to_gold if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe moved_to_gold mean_gold_shock_r c.time_t##i.region c.pobreza##c.time_t c.pobl_tot##c.time_t c.disbogota##c.time_t c.paved_roads##c.time_t, absorb(wartimenetwork year origmun) vce(cluster origmun id)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
estadd local MT = "$\checkmark$"
estadd local BC = "$\checkmark$"
summ moved_to_gold if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo

reghdfe moved_to_gold mean_gold_shock_r c.time_t##i.region c.pobreza##c.time_t c.pobl_tot##c.time_t c.disbogota##c.time_t c.paved_roads##c.time_t age female black indigenous , absorb(wartimenetwork year origmun) vce(cluster origmun id)
estadd local ALLFE = "$\checkmark$"
estadd local TT = "$\checkmark$"
estadd local MT = "$\checkmark$"
estadd local BC = "$\checkmark$"
estadd local CO = "$\checkmark$"
summ moved_to_gold if e(sample) ==1
estadd local meanDep = trim("`: display %12.4fc `r(mean)''")
estadd local SDDep = trim("`: display %12.4fc `r(sd)''")
eststo


esttab est*, se

//esttab est* using "~/Dropbox/Replication_MVC/Paper_tables/TableA6.tex", se ///
//	   star(* 0.10 ** 0.05 *** 0.01 ) ///
//	   stats(meanDep SDDep N ALLFE TT MT BC CO, fmt(%12.4fc %12.4fc  %12.0fc %12.0fc %12.0fc %12.0fc  %12.0fc %12.0fc) ///
//	   label("\small Mean of Outcome" "\small S.D of Outcome" "\small Observations" "\small Municipality, Year, and Group FE" "\small Time Trends" "\small Region $\times$ Year"  ///
//		"\small Municipality Characteristics TT" "\small Individual Covariates" )) ///
//	   keep(mean_gold_shock_r ) ///
//	   varlabels(mean_gold_shock_r "Average Shock" ) ///
//	   ti("The effect of the economic shock on mobility") ///	  
//	   replace  

/// For Table A28
esttab est* using "~/Dropbox/Replication_MVC/Paper_tables/TableA28.tex", se ///
	   star(* 0.10 ** 0.05 *** 0.01 ) ///
	   stats(meanDep SDDep N ALLFE TT MT BC CO, fmt(%12.4fc %12.4fc  %12.0fc %12.0fc %12.0fc %12.0fc  %12.0fc %12.0fc) ///
	   label("\small Mean of Outcome" "\small S.D of Outcome" "\small Observations" "\small Municipality, Year, and Group FE" "\small Time Trends" "\small Region $\times$ Year"  ///
		"\small Municipality Characteristics TT" "\small Individual Covariates" )) ///
	   varlabels(mean_gold_shock_r "Average Shock" ) ///
	   ti("The effect of the economic shock on mobility") ///	  
	   replace  
